Page({

    data: {
        longitude: '',
        longitude: '',

    },

    onLoad: function (e) {
        var wxthis = this;
        wx.getLocation({
            type: 'wgs84', //返回可以用于wx.openLocation的经纬度
            success: function(res) {
                console.log(res)
                var latitude = res.latitude
                var longitude = res.longitude
                var a = 121.602785;
                var b = 31.19348;
                wx.openLocation({
                    latitude: b,
                    longitude: a,
                    scale: 28,
                    name:'盛大全球研发中心',
                    address:'上海市浦东新区张衡路666弄1号'
                })
            }
        })


    },


    homeClick: function (e) {
        wx.redirectTo({
            url: '/pages/index/index'
        })
    },
    refreshClick: function (e) {
        wx.redirectTo({
            url: '/pages/msg/index'
        })
    }
});